home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / octa209s.zip / octave-2.09 / libs / f2c / src / makefile < prev    next >
Makefile  |  1996-10-06  |  3KB  |  93 lines

  1. #    Makefile for f2c, a Fortran 77 to C converter
  2. #          (portiert auf OS/2, Klaus Gebhardt)
  3.  
  4. CC=gcc
  5. # CFLAGS = -O -m486
  6. CFLAGS = -g 
  7.  
  8. %.o: %.c; $(CC) $(CFLAGS) -c $< -o $@
  9.  
  10. OBJECTSd = main.o init.o gram.o lex.o proc.o equiv.o data.o \
  11.     format.o expr.o exec.o intr.o io.o misc.o error.o \
  12.     mem.o names.o output.o p1output.o pread.o put.o \
  13.     putpcc.o vax.o formatdata.o parse_args.o niceprintf.o \
  14.     cds.o sysdep.o version.o
  15. OBJECTS = $(OBJECTSd) # malloc.o
  16.  
  17. all: f2c.exe f2c.1
  18.  
  19. f2c.exe : $(OBJECTS)
  20.     $(CC) $(LDFLAGS) $(OBJECTS) -o f2c.exe
  21.  
  22. gram.c:    gram.head gram.dcl gram.expr gram.exec gram.io defs.h tokdefs.h
  23.     sed <tokdefs.h "s/#define/%token/" >gram.in
  24.     cat gram.head gram.dcl gram.expr gram.exec gram.io >>gram.in
  25.     @echo YACC: 4 shift/reduce expected...
  26.     $(YACC) $(YFLAGS) gram.in
  27.     sed "s/^# line.*/\\/* & *\\//" y.tab.c >gram.c
  28.     rm -f gram.in y.tab.c
  29.  
  30. $(OBJECTSd): defs.h ftypes.h defines.h machdefs.h sysdep.h
  31.  
  32. tokdefs.h: tokens
  33.     grep -n . <tokens | sed -f tokdefs.sed >tokdefs.h
  34.  
  35. cds.o: sysdep.h
  36. exec.o: p1defs.h names.h
  37. expr.o: output.h niceprintf.h names.h
  38. format.o: p1defs.h format.h output.h niceprintf.h names.h iob.h
  39. formatdata.o: format.h output.h niceprintf.h names.h
  40. gram.o: p1defs.h
  41. init.o: output.h niceprintf.h iob.h
  42. intr.o: names.h
  43. io.o: names.h iob.h
  44. lex.o : tokdefs.h p1defs.h
  45. main.o: parse.h usignal.h
  46. mem.o: iob.h
  47. names.o: iob.h names.h output.h niceprintf.h
  48. niceprintf.o: defs.h names.h output.h niceprintf.h
  49. output.o: output.h niceprintf.h names.h
  50. p1output.o: p1defs.h output.h niceprintf.h names.h
  51. parse_args.o: parse.h
  52. proc.o: tokdefs.h names.h niceprintf.h output.h p1defs.h
  53. put.o: names.h pccdefs.h p1defs.h
  54. putpcc.o: names.h
  55. vax.o: defs.h output.h pccdefs.h
  56. output.h: niceprintf.h
  57.  
  58. put.o putpcc.o: pccdefs.h
  59.  
  60. f2c.t: f2c.1t
  61.     troff -man f2c.1t >f2c.t
  62.  
  63. f2c.1: f2c.1t
  64.     nroff -man f2c.1t 2>NUL >f2c.1
  65.  
  66. clean:
  67.     rm -f gram.c *.o f2c.exe tokdefs.h f2c.t f2c.1
  68.  
  69. b = Notice README cds.c data.c defines.h defs.h equiv.c error.c \
  70.     exec.c expr.c f2c.h format.c format.h formatdata.c \
  71.     ftypes.h gram.dcl gram.exec gram.expr gram.head gram.io \
  72.     init.c intr.c io.c iob.h lex.c machdefs.h main.c \
  73.     malloc.c mem.c memset.c misc.c names.c names.h niceprintf.c \
  74.     niceprintf.h output.c output.h p1defs.h p1output.c \
  75.     parse.h parse_args.c pccdefs.h pread.c proc.c put.c putpcc.c \
  76.     sysdep.c sysdep.h tokens usignal.h vax.c version.c xsum.c
  77.  
  78.  
  79. xsum.exe : xsum.c
  80.     $(CC) $(CFLAGS) -o xsum.exe xsum.c
  81.  
  82. #Check validity of transmitted source...
  83. #On non-Unix systems that end lines with carriage-return/newline pairs,
  84. #use "make xsumr.out" rather than "make xsum.out".  The -r flag ignores
  85. #carriage-return characters.
  86. xsumr.out: xsum.exe $b
  87.     xsum $b >xsum1.out
  88.     cmp xsum0.out xsum1.out && mv xsum1.out xsumr.out
  89.  
  90. #Erzeuge den File xsum0.out
  91. xsum0.out: xsum.exe $b
  92.     xsum $b >xsum0.out
  93.